package com.cn.algorithm02.class04;

import java.util.*;

/***
 * @author: hels
 * @description:
 **/
public class C08_HashTree {
    public static void main(String[] args) {
        TreeMap<Integer, String> treeMap = new TreeMap<>();
        treeMap.put(2, "我是2");
        treeMap.put(3, "我是3");
        treeMap.put(1, "我是1");
        //treeMap.put(null, null); // key不能为null
        System.out.println(treeMap);


        Integer a = -129;
        Integer b = -129;
        System.out.println(a == b);
        HashMap<String, String> map = new HashMap<>();
        String str = new String("wo");
        String str2 = new String("wo");
        map.put(str, "1");
        map.put(str, "1");
        map.put(null, null); // {null=null, wo=1}
//        System.out.println(map.containsKey(str2)); // String 类型，进行判断也是使用值进行传递
        System.out.println(map);

    }
}
